{include file="comm/left"}
<body>
<div class="col-sm-6">
    <div class="ibox float-e-margins">
        <div class="ibox-title">
            <h5>商品详情图片的添加</h5>
            <div class="ibox-tools">
                <a class="collapse-link">
                    <i class="fa fa-chevron-up"></i>
                </a>
            </div>
        </div>
        <div class="ibox-content">
            <form class="form-horizontal m-t" id="commentForm" action="" method="post"  enctype="multipart/form-data">
                <div class="form-group">
                    <label class="col-sm-3 control-label">商品详情图片：</label>
                    <div class="col-sm-9">
                        <input type="file" name="image[]" class="form-control" style="float:left;">
                        <input type="button" class="btn btn-success" id="add" name="add" value="+ 添加选项" style="float:left;">
                     </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-4 col-sm-offset-3">
                        <input type="hidden" name="id" value="{$id}">
                        <button class="btn btn-primary" type="submit" name="submit">添加</button>
                    </div>
                </div>
            </form>
        </div>
    </div >
</div>
</body>
<script type="text/javascript">
    $("#add").click(function(){
        $(this).before('<input type="file" class="form-control" style=" float:left;"  name="image[]" style="float:left;">');
    });
</script>